import Vue from 'vue'
import Router from 'vue-router'

import indexPage from '../views/index.vue'
import zpIndex from '../views/index/zpIndex.vue'
import initPage from '../views/initPage.vue'

import demoIndex from '../../demo/demoIndex.vue'
import fullCalendarDemo from '../../demo/fullCalendarDemo.vue'
import BreadcrumbDemo from '../../demo/BreadcrumbDemo.vue'

// 发布职位
import postJob from '../../demo/postJob.vue'
import recmdToDept from '../../demo/recmdToDept.vue'
// 统计报表
import statisticsCharts from '../../demo/statisticalReport/statisticsCharts.vue'
// 招聘职位
import recruitPosition from '../../demo/position/recruitPosition.vue'
import addPosition from '../../demo/addPosition.vue'

//招聘管理
import viewJobDetails from '../views/recruitManage/viewJobDetails.vue'
// 邀约面试
import inviteInterview from '../views/inviteInterview/inviteInterview.vue'

//简历详情
import resumeDetail from '../views/resumeDetail/resumeDetail.vue'

Vue.use(Router)

export default new Router({
  linkActiveClass: 'open active',
  scrollBehavior: () => ({ y: 0 }),
  routes: [
    {
      path: '/',
      name: 'zpIndex',
      component: indexPage,
      redirect:"zpIndex",
      children: [
        // 初始頁面
        {
          path: 'zpIndex',
          name: 'zpIndex',
          component: zpIndex
        },
          {
              path: 'inviteInterview',
              name: 'inviteInterview',
              component: inviteInterview
          },
      ]
    },
      {
          path: '/demoIndex',
          name: 'demoIndex',
          component: demoIndex,
          children:[
              // 日历计划表的demo
              {
                  path: 'fullCalendarDemo',
                  name: 'fullCalendarDemo',
                  component: fullCalendarDemo
              },
              // 导航 面包屑的 demo
              {
                  path: 'BreadcrumbDemo',
                  name: 'BreadcrumbDemo',
                  component: BreadcrumbDemo
              },
              // 发布职位
              {
                  path: 'postJob',
                  name: 'postJob',
                  component: postJob
              },
              // 推荐至用人部门
              {
                  path: 'recmdToDept',
                  name: 'recmdToDept',
                  component: recmdToDept
              },
              // 统计报表
              {
                  path: 'statisticsCharts',
                  name: 'statisticsCharts',
                  component: statisticsCharts
              },
              // 招聘职位
              {
                  path: 'recruitPosition',
                  name: 'recruitPosition',
                  component: recruitPosition
              },
              // 招聘职位
              {
                  path: 'addPosition',
                  name: 'addPosition',
                  component: addPosition
              }
          ]
      },

    {
        path: '/viewJobDetails',
        name: 'viewJobDetails',
        component: viewJobDetails,
        children:[

        ]
    },
      {
          path: '/resumeDetail',
          name: 'resumeDetail',
          component: resumeDetail,
          children:[

          ]
      }
  ]
})
